package com.bgIntlgn.client.entity.sells.receipt;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;
/**
 * 开税票记录
 * @author sk-32
 *
 */
@Table(name = "invoice_records", constrain = "")
public class InvoiceRecord implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('invoice_records_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;

	@Field(name = "date", type = "timestamp", constrain = "")
	private Date date;

	/**
	 * 金额.
	 */
	@Field(name = "money", type = "numeric(11,3)", constrain = "default 0.0")
	private double money;

	/**
	 * 发票号
	 */
	@Field(name = "serial_number", type = "varchar(80)", constrain = "unique")
	private String serialNumber;

	@Field(name = "custom_id", type = "int8", constrain = " not null references customs(id)  on update cascade ")
	private Long customId;

	@Field(name = "contactor_id", type = "int8", constrain = " not null references contactors(id)  on update cascade ")
	private Long contactorId;

	/**
	 * 创建人。
	 */
	@Field(name = "creater", type = "int8", constrain = "not null references employees(id)  on update cascade ")
	private Long creater;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public double getMoney() {
		return this.money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	public String getSerialNumber() {
		return this.serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

	public Long getCustomId() {
		return this.customId;
	}

	public void setCustomId(Long customId) {
		this.customId = customId;
	}

	public Long getContactorId() {
		return this.contactorId;
	}

	public void setContactorId(Long contactorId) {
		this.contactorId = contactorId;
	}

	public Long getCreater() {
		return this.creater;
	}

	public void setCreater(Long creater) {
		this.creater = creater;
	}

}
